package com.wmeimob.fastboot.jiubei.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;


/**
 * ShopCart.java
 * http://www.wmeimob.com
 * Copyright © 2018 wmeimob All Rights Reserved,version 1.0
 *
 * @author：wjt Thu Aug 20 10:06:35 CST 2020 Created
 */

@Table(name = "`shop_cart`")
@Data
public class ShopCart implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * Id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;
    /**
     * 用户id
     */
    @Column(name = "user_id")
    private Long userId;
    /**
     * 会员编号
     */
    @Column(name = "user_no")
    private String userNo;
    /**
     * 商品ID
     */
    @Column(name = "goods_id")
    private Integer goodsId;
    /**
     * sku编号
     */
    @Column(name = "sku_no")
    private String skuNo;
    /**
     * 数量
     */
    @Column(name = "quantity")
    private Integer quantity;
    /**
     * 是否失效 0 否 1 是
     */
    @Column(name = "is_invalid")
    private Boolean invalid;
    /**
     * GmtCreate
     */
    @Column(name = "gmt_create")
    @JsonFormat(locale = "zh", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date gmtCreate;
    /**
     * GmtModified
     */
    @Column(name = "gmt_modified")
    @JsonFormat(locale = "zh", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date gmtModified;
    /**
     * 是否删除
     */
    @Column(name = "is_del")
    private Boolean del;
    @Transient
    private Integer[] idArr;
}